<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background-color: darkgray;
        }
        .wuhu{
            width: 20px;
            height: 10px;
            margin: 9px auto;
            background-color: violet;
        }
        .sj{
            display: none;
            position: absolute;
            top: -90px;
            left: 40%;
            width: 0;
            height: 0;
            border: 45px solid transparent;
            border-bottom-color: white;
        }
        .nav{
            display: none;
            position: relative;
            width: 500px;
            height: 500px;
            margin: 50px auto;
            background-color: white;
        }
        
    </style>
</head>
<body>
   <div class="wuhu"></div>
    <div class="nav">
        <div class="sj">
        </div>
    </div>

    

    <script>
        var wuhu = document.querySelector('.wuhu');
        var nav = document.querySelector('.nav');
        var sj = document.querySelector('.sj');

        wuhu.addEventListener('mouseover' , function(){
            nav.style.display = 'block';
            sj.style.display = 'block';
        })
        wuhu.addEventListener('mouseout' , function(){
            nav.style.display = 'none';
            sj.style.display = 'none';
        })
    </script>
</body>
</html>